//
//  agentminecell.m
//  qiyunapp
//
//  Created by qiyun on 2018/7/14.
//  Copyright © 2018年 qiyun. All rights reserved.
//

#import "agentminecell.h"
#import "mineAppM.h"
#import "itemModel.h"
@interface agentminecell ()
@property (weak, nonatomic) IBOutlet UILabel *title1;
@property (weak, nonatomic) IBOutlet UIImageView *icon1;
@property (weak, nonatomic) IBOutlet UIImageView *icon2;
@property (weak, nonatomic) IBOutlet UIImageView *icon3;
@property (weak, nonatomic) IBOutlet UIImageView *icon4;
@property (weak, nonatomic) IBOutlet UILabel *titlea;
@property (weak, nonatomic) IBOutlet UILabel *titleb;
@property (weak, nonatomic) IBOutlet UILabel *titlec;
@property (weak, nonatomic) IBOutlet UILabel *titled;

@end
@implementation agentminecell

-(void)initmineModel:(NSArray *)modelarray  setRow:(NSInteger)item{
    mineAppM*model=modelarray[item];
    _title1.text=model.title1;
    NSArray*itemarray=model.items;
    for (int i=0; i<4;i++ ) {
        itemModel*itemModel=itemarray[i];
        if (i==0) {
            _titlea.text=itemModel.title;
            _icon1.image=IMAGE(itemModel.icon);
        }else if(i==1){
            _titleb.text=itemModel.title;
            _icon2.image=IMAGE(itemModel.icon);
        }else if(i==2){
            _titlec.text=itemModel.title;
            _icon3.image=IMAGE(itemModel.icon);
        }else {
            _titled.text=itemModel.title;
            _icon4.image=IMAGE(itemModel.icon);
        }
       
    }
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
